﻿@model CNDreams.Web.Areas.ModuleLogin.Models.ModelLoginIndex
@{
	Layout = null;
}
<!DOCTYPE html>
<html>
<head>
	<title>系统</title>
	<script src="/Scripts/jquery-1.6.2.min.js" type="text/javascript"></script>
	<script src="/Scripts/jquery-ui-1.8.11.js" type="text/javascript"></script>
	<link href="/Content/themes/redmond/jquery.ui.all.css" rel="stylesheet" type="text/css" />
	<link rel="shortcut icon" href="/Content/Images/favicon.ico" type="image/x-icon" />
	<script type="text/javascript">
		function login() {
			if ($("#SysUser_UserAccount").val() == "" || $("#SysUser_UserAccount").val() == "请输入用户名") {
				window.top.sysAlert('@(CNDreams.Resources.Properties.Resources.M10004I)');
			}
			else {
				var hasChecked;
				if ($("#RememberLoginStatus").attr("checked") == "checked")
					hasChecked = true;
				else
					hasChecked = false;
				$.ajax({
					type: "POST",
					url: "/ModuleLogin/Login/index",
					data: "SysUser.UserAccount=" + $("#SysUser_UserAccount").val() + "&SysUser.Password=" + $("#SysUser_Password").val() + "&rememberLoginStatus=" + hasChecked,
					success: function (msg) {
						msg = eval("(" + msg + ")");
						if (msg.result == "")
							window.location = "/home";
						else {
							sysAlert(msg.result);
						}
					}
				});
			}
		}

		function sysAlert(message) {
			if (message == undefined)
				return;
			$("#sysAlert").html(message);
			$("#sysAlert").dialog({ modal: true, title: "系统提示", height: "200" });
			$("#sysAlert").dialog({
				modal: true,
				buttons: {
					确定: function () {
						$(this).dialog("close");
					}
				}
			});
		}

		$(function () {
			$("#SysUser_UserAccount").click(
				function () {
					if ($.trim($(this).val()) == "请输入用户名") {
						$(this).val("");
					}
				}
			);
			$("#SysUser_UserAccount").blur(
				function () {
					if ($.trim($(this).val()) == "") {
						$(this).val("请输入用户名");
					}
				}
			);
			if ($.trim($("#SysUser_UserAccount").val()) == "") {
				$("#SysUser_UserAccount").val("请输入用户名");
			}
			$("#SysUser_UserAccount").select();
			$("#SysUser_UserAccount").focus();

			$(document).bind('keypress', function (e) {
				var code = (e.keyCode ? e.keyCode : e.which);
				if (code == 13) {
					login();
				}
			});

		});

	</script>
	<style type="text/css">
		*
		{
			margin: 0;
			padding: 0;
			border: 0;
			font-size: 12px;
			font-family: Verdana, Arial, Helvetica, sans-serif;
			scrollbar-face-color: #dff9fe;
			scrollbar-highlight-color: #FFFFFF;
			scrollbar-3dlight-color: #9adae7;
			scrollbar-darkshadow-color: #9adae7;
			scrollbar-shadow-color: #FFFFFF;
			scrollbar-arrow-color: #006498;
			scrollbar-track-color: #fff;
		}
		html
		{
			height: 100%;
			overflow-y: hidden;
			overflow-x: hidden;
		}
		body
		{
			overflow: hidden; /*-moz-user-select:none;*/
			hutia: expression(this.onselectstart=function(){return(false)});
		}
		table
		{
			border-collapse: collapse;
		}
		
		.login_feild
		{
			top: 0px;
			position: absolute;
			height: 100%;
			width: 100%;
			background: url("/content/images/user_04.png") no-repeat center transparent;
		}
		.login_feild td
		{
			background-image: none;
		}
		.account-field
		{
			height: 28px;
			vertical-align: bottom;
		}
		.account-field input
		{
			height: 24px;
			line-height: 24px;
			font-size: 14px;
			background-color: transparent;
			color: #7b7b7b;
			width: 152px;
		}
		.account-field input:focus
		{
			outline: none;
		}
		.password-field
		{
			height: 33px;
			vertical-align: bottom;
		}
		.password-field input
		{
			color: #7b7b7b;
			height: 24px;
			line-height: 24px;
			font-size: 14px;
			background-color: transparent;
			width: 152px;
		}
		.password-field input:focus
		{
			outline: none;
		}
		.logonbutton
		{
			left: -40px;
			position: relative;
			width: 81px;
			height: 29px;
			background: url("/content/images/button.png") no-repeat 0px 0px transparent;
		}
		.logonbutton:hover
		{
			width: 81px;
			height: 29px;
			background: url("/content/images/button.png") no-repeat 0px -40px transparent;
		}
		.logonbottom
		{
			color: #7B7B7B;
			height: 20px;
			padding-top: 10px;
			padding-bottom: 3px;
			line-height: 20px;
			position: absolute;
			bottom: 0px;
			width: 100%;
			background: url("/content/images/bg_bottom.jpg") repeat-x bottom transparent;
		}
		.logonbottom div
		{
			display: inline;
			height: 20px;
			padding-left: 29px;
			background: url("/content/images/logo.png") no-repeat center transparent;
		}
		/*#endregion*/
		
		/*#region*/
		.header
		{
			height: 40px;
			color: #fff;
			overflow: visible;
			background: url(/content/images/header_bg.png) repeat-x transparent;
		}
		.ui-effects-transfer
		{
			border: 2px dotted gray;
		}
		
		.header .header-left
		{
			position: absolute;
			height: 53px;
			width: 265px;
		}
		.header .header-left .logo-left
		{
			height: 53px;
			background: url(/content/images/icons.png) no-repeat;
			float: left;
			width: 27px;
		}
		.header .header-left .logo-center
		{
			height: 53px;
			background: url(/content/images/icons.png) no-repeat -60px 0px transparent;
			float: left;
			width: 210px;
		}
		.header .header-left .logo-right
		{
			height: 53px;
			background: url(/content/images/icons.png) no-repeat -30px 0px transparent;
			float: left;
			width: 27px;
		}
		.header .header-left div
		{
			border: 0px;
			height: 60px;
		}
		.header .header-left div img
		{
			vertical-align: middle;
		}
		.header .header-center
		{
			position: absolute;
			left: 265px;
			color: #7b7b7b;
			padding: 10px 0px 0px 0px;
			-moz-user-select: none;
		}
		.header .header-right
		{
			float: right;
			padding-top: 0px;
			width: 420px;
		}
	</style>
</head>
<body style="background-image: url('/Content/Images/login_bg_main.jpg'); background-repeat: repeat-x;
	padding: 0px; margin: 0px; vertical-align: middle; background-position: center;
	height: 100%;">
	<div class="login_feild">
		<table id="tbLogin" style="width: 100%; height: 100%;" border="0" cellpadding="0"
			cellspacing="0">
			<colgroup>
				<col width="50%" />
				<col width="50%" />
			</colgroup>
			<tr>
				<td>
					&nbsp;
				</td>
				<td style="text-align: left; padding-top: 2px;">
					<table style="width: 100%;" cellpadding="0" cellspacing="0" border="0">
						<tr>
							<td class="account-field">
								@Html.TextBoxFor(x => x.SysUser.UserAccount, new { @class = "input-user", value = "请输入用户名" })
							</td>
						</tr>
						<tr>
							<td class="password-field">
								@Html.PasswordFor(x => x.SysUser.Password, new { @class = "input-password" })
								<span style="color:White; top:5px; position:relative;">@Html.CheckBoxFor(x => x.RememberLoginStatus, new { style="width:20px"})</span>
							</td>
							
						</tr>
						<tr>
							<td style="height: 40px; vertical-align: bottom;">
								<input class="logonbutton" type="button" value="" onclick="login()" />&nbsp;
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		<div title="系统提示" style="width: auto; min-height: 0px; height: 65px; display: none;"
			id="dialog-message" class="ui-dialog-content ui-widget-content">
			<table style="width: 100%;">
				<tbody>
					<tr>
						<td>
							<span class="icon-information" style="float: left;"></span>
						</td>
						<td style="height: 100%; width: 100%;">
							<span style="line-height: 20px;" id="dialog-message-text"></span>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
	<div class="header">
		<div class="header-left">
			<div class="logo-left">
			</div>
			<div class="logo-center">
			</div>
			<div class="logo-right">
			</div>
		</div>
		<div class="header-center" id="header_center">
		</div>
		<div class="header-right">
		</div>
	</div>
	<div class="logonbottom">
		版权所有：#<div>
		</div>
	</div>
	<div id="sysAlert" class="info" style="display: none">
		系统消息--操作失败
	</div>
</body>
<script type="text/javascript" language="javascript">
	$(document).ready(function ($) {
		resizeForm();
	});
	$(window).resize(function () {
		resizeForm();
	});
	function resizeForm() {
		var wHeight = (window.document.documentElement.clientHeight || window.document.body.clientHeight || window.innerHeight);
		var top = wHeight - $(".logonbottom").outerHeight();
	}
</script>
</html>
